﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ThanhTu.GNC.Media.KQXS.DataAccess.DAL;
using ThanhTu.GNC.Media.KQXS.DataAccess.DO;
using System.Data;

namespace ThanhTu.GNC.Media.KQXS.DataAccess.BL
{
    public class ResultLotteryBL : IDisposable
    {
        private ResultLotteryDAL vResultLotteryDAL = null;
        private bool disposed = false;
        public ResultLotteryBL()
        {
            if (vResultLotteryDAL == null)
            {
                vResultLotteryDAL = new ResultLotteryDAL();
            }
        }
        ~ResultLotteryBL() { Dispose(false); }

        #region IDisposable Members

        public void Dispose()
        {
            Dispose(true);
            GC.SuppressFinalize(this);
        }

        private void Dispose(bool disposing)
        {
            if (!disposed)
            {
                if (disposing)
                {
                    if (vResultLotteryDAL != null)
                    {
                        vResultLotteryDAL.Dispose();
                        vResultLotteryDAL = null;
                    }
                }

                disposed = true;
            }
        }

        #endregion

        public int SaveLottery(ResultLotteryDO vResultLottery) { return vResultLotteryDAL.SaveLottery(vResultLottery); }
        public int DeleteLottery(string ProvinceID, DateTime INNGAY_MO) { return vResultLotteryDAL.DeleteLottery(ProvinceID, INNGAY_MO); }
        public int StatusLotteryResult(string ProvinceID, DateTime INNGAY_MO) { return vResultLotteryDAL.StatusLotteryResult(ProvinceID, INNGAY_MO); }
        public List<ResultLotteryDO> SelectALL_KQ_QT() { return vResultLotteryDAL.SelectALL_KQ_QT(); }
        public List<ResultLotteryDO> Select_KQ_Tinh_QT(string ProvinceID, DateTime INNGAY_MO) { return vResultLotteryDAL.Select_KQ_Tinh_QT(ProvinceID, INNGAY_MO); }
        public DataTable SelectAll_KQ_QT_Page(int pageIndex, int pageSize, ref int rowCount) { return vResultLotteryDAL.SelectAll_KQ_QT_Page(pageIndex, pageSize, ref  rowCount); }
        public DataTable SelectAll_KQ_User(int pageIndex, int pageSize, ref int rowCount) { return vResultLotteryDAL.SelectAll_KQ_User(pageIndex, pageSize, ref  rowCount); }
        public DataTable SelectAll_KQ_Province_User(string ProvinceID, int pageIndex, int pageSize, ref int rowCount) { return vResultLotteryDAL.SelectAll_KQ_Province_User(ProvinceID, pageIndex, pageSize, ref  rowCount); }
        public DataTable SelectAll_KQ_Region_User(string RegionID, int pageIndex, int pageSize, ref int rowCount) { return vResultLotteryDAL.SelectAll_KQ_Region_User(RegionID, pageIndex, pageSize, ref  rowCount); }
        public DataTable SelectAll_KQ_Thongke(string thongke, string ProvinceID, DateTime To_date, DateTime From_date) { return vResultLotteryDAL.SelectAll_KQ_Thongke(thongke, ProvinceID, To_date, From_date); }
        public DataTable SelectAll_KQ_Thongke_Thang(string thongke, string ProvinceID, string MONTH) { return vResultLotteryDAL.SelectAll_KQ_Thongke_Thang(thongke, ProvinceID, MONTH); }
        public DataTable GETALL_RESULT_PROVINCE_DATE(DateTime date, string provinceid, int pageIndex, int pageSize, ref int rowCount) { return vResultLotteryDAL.GETALL_RESULT_PROVINCE_DATE(date, provinceid, pageIndex, pageSize, ref  rowCount); }
        public DataTable GETALL_RESULT_REGION_DATE(DateTime date, string regionid, int pageIndex, int pageSize, ref int rowCount) { return vResultLotteryDAL.GETALL_RESULT_REGION_DATE(date, regionid, pageIndex, pageSize, ref  rowCount); }
        public DataTable SelectAll_KQ_User_date(DateTime date, int pageIndex, int pageSize, ref int rowCount) { return vResultLotteryDAL.SelectAll_KQ_User_date(date, pageIndex, pageSize, ref  rowCount); }
        public DataTable Statistic_0_99(string provinceID, DateTime to_date, DateTime from_date, int pageIndex, int pageSize, ref int rowCount) { return vResultLotteryDAL.Statistic_0_99(provinceID, to_date, from_date, pageIndex, pageSize, ref  rowCount); }
        public DataTable Statistic_0_To_9(string provinceID, DateTime to_date, DateTime from_date, int pageIndex, int pageSize, ref int rowCount) { return vResultLotteryDAL.Statistic_0_To_9(provinceID, to_date, from_date, pageIndex, pageSize, ref  rowCount); }
        public DataTable Statistic_Spec_Month(string provinceID, string date, int pageIndex, int pageSize, ref int rowCount) { return vResultLotteryDAL.Statistic_Spec_Month(provinceID, date, pageIndex, pageSize, ref  rowCount); }
        public DataTable Statistic_Spec_Month_2(string provinceID, string date, int pageIndex, int pageSize, ref int rowCount) { return vResultLotteryDAL.Statistic_Spec_Month_2(provinceID, date, pageIndex, pageSize, ref  rowCount); }
        public DataTable STATISTIC_SPEC_WEEK(string provinceID, string date, int pageIndex, int pageSize, ref int rowCount) { return vResultLotteryDAL.STATISTIC_SPEC_WEEK(provinceID, date, pageIndex, pageSize, ref  rowCount); }
        public DataTable STATISTIC_SPEC_WEEK_2(string provinceID, string date, int pageIndex, int pageSize, ref int rowCount) { return vResultLotteryDAL.STATISTIC_SPEC_WEEK_2(provinceID, date, pageIndex, pageSize, ref  rowCount); }
        public DataTable Statistic_2SPEC(string number, string provinceID, DateTime to_date, DateTime from_date) { return vResultLotteryDAL.Statistic_2SPEC(number, provinceID, to_date, from_date); }
    }
}
